import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/home/index'
import Kind from '../views/kind/index'
import User from '../views/user/index'
import Footer from '../components/Footer'
// import Login from '../views/login/index'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'home',
    components: {
      default: Home,
      footer: Footer
    }
  },
  {
    path: '/kind',
    name: 'kind',
    components: {
      default: Kind,
      footer: Footer
    }
  },
  {
    path: '/user',
    name: 'user',
    components: {
      default: User,
      footer: Footer
    }
  },
  // {
  //   path: '/login',
  //   name: 'login',
  //   component: Login
  // }
  // {
  //   path: '/',
  //   name: 'Home',
  //   component: Home
  // },
  {
    path: '/contactCustomer',
    name: 'ContactCustomer',
    component: () => import(/* webpackChunkName: "about" */ '../views/lwj/contactCustomer.vue')
  },
  {
    path: '/customerWork',
    name: 'CustomerWork',
    component: () => import(/* webpackChunkName: "about" */ '../views/lwj/customerWork.vue')
  },
  {
    path: '/dynamicDetail',
    name: 'DynamicDetail',
    component: () => import(/* webpackChunkName: "about" */ '../views/lwj/dynamicDetail.vue')
  },
  {
    path: '/staticDetail',
    name: 'StaticDetail',
    component: () => import(/* webpackChunkName: "about" */ '../views/lwj/staticDetail.vue')
  },
  {
    path: '/footprint',
    name: 'Footprint',
    component: () => import(/* webpackChunkName: "about" */ '../views/lwj/footprint.vue')
  },
  {
    path: '/saleService',
    name: 'SaleService',
    component: () => import(/* webpackChunkName: "about" */ '../views/lwj/saleService.vue')
  }
  // {
  //   path: '/login',
  //   name: 'login',
  //   component: Login
  // }
  // {
  //   path: '/',
  //   name: 'Home',
  //   component: Home
  // },
  // {
  //   path: '/about',
  //   name: 'About',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
